var app = getApp(), fetchApi = require("../../../utils/httpPost.js")
, common_Js = require("../../../component/common.js");
import Dialog from '../../../component/vant/dialog/dialog';
import Toast from '../../../component/vant/toast/toast';
const message = '是否确认取消该订单？'
Page({
  /**
   * 页面的初始数据
   */
  data: {
    scrollTop: 0,
    scrollHeight:0,
    hasData:false,
    orderList:[],
    loading: false,
    netWork: false,
    isLoading: true,
    visible:false,
    orderInfos:[],
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    if(options.order_id){
      this.data.order_id = parseInt(options.order_id);
    }
    this.onHttpInit();
  },
  /**
   * 获取页面数据的 http请求
   */
  onHttpInit: function () {
    var that = this
    fetchApi.httpPost('/property/order/detail', { 
      order_id:that.data.order_id
    }, 
      function (res) {
        that.setData({ isReady: true, isShouquan: 'yes' })
        console.log('获取物业费订单详情', res)
        if (res.data.code == 0) {
          that.data.order = res.data.data.order;
          that.setData({
            hasData:true,
            order: that.data.order,
            orderInfos:  res.data.data.order.orderInfos,
          })
        } else {
          console.log("获取物业费订单详情 异常", res.data.msg)
        }
        that.setData({
          isLoading:false
        })
        wx.hideNavigationBarLoading() //完成停止加载
        wx.stopPullDownRefresh() //停止下拉刷新
    },function(){})
  },
})